<template>
	<view class="common-header">
		<view class="common-header-content" :class="[bgShow?'bgColor':'']">
			<view class="back" @click="back()">
				<image src="/static/images/back-left-white.png" mode=""></image>
			</view>
			<view class="title-text">{{ title }}</view>
		</view>
		<view class="seat" v-if="needSeat"></view>
	</view>
</template>

<script>
	export default {
		name:"CommHeaderCom",
		props:{
			bgShow:{
				type:Boolean,
				default:false
			},
			title:{
				type:String,
				default:""
			},
			needSeat:{
				type:Boolean,
				default:false
			}
		},
		methods: {
		 back(){
			 uni.navigateBack({});
		 } 
		}
	}
</script>

<style scoped lang="scss">
	.common-header-content{
		width: 100%;
		height: 88rpx;
		background: rgba(0,0,0,0);
		display: flex;
		align-items: center;
		justify-content: center;
		position: fixed;
		left:0;
		top:0;
		z-index: 999;
	}
	.seat{
		width: 100%;
		height: 88rpx;
	}
	.bgColor{
		background:#FFFFFF;
	}
	.title-text{
		font-size: 32rpx;
		font-weight: 500;
		color: #FFFFFF;
	}
	.back{
		width: 88rpx;
		height: 88rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		position: absolute;
		left:0;
		top:0;
		>image{
			display: block;
			width: 48rpx;
			height: 48rpx;
		}
	}
	
</style>
